<% var pageJavaScript = { %>
<script>
    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor');
</script>
<%}; %>

<%
layout("/common/layout/_main_layout.html",{pageTitle:'页面管理', pageJavaScript:pageJavaScript}){
%>

<div class="page-header">
	<h1>
		新增页面
	</h1>
</div>

<div class="row">
	<div class="col-xs-12">
		<form class="form-horizontal" role="form" action="${ctxPath}/system/page/do_add" method="post">
			${token}
			<div class="form-group">
				<label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 页面名称 </label>
				<div class="col-sm-11">
					<input type="text" name="info.name" placeholder="页面名称" class="col-xs-10 col-sm-10" value="${name!}"/>
					<span class="help-inline col-xs-12 col-sm-7"> 
						<span class="middle red">${nameMsg!}</span>
					</span>						
				</div>
			</div>
		
			<div class="form-group">
				<label class="col-sm-1 control-label no-padding-right" for="form-field-2"> 页面描述 </label>
				<div class="col-sm-11">
					<input type="text" name="info.desc" placeholder="页面描述" class="col-xs-10 col-sm-10" value="${desc!}"/> 
					<span class="help-inline col-xs-12 col-sm-7"> 
						<span class="middle red">${descMsg!}</span>
					</span>					
				</div>
			</div>
	
			<div class="form-group">
				<script id="editor" name="info.content" type="text/plain" style="height:500px;"></script>
			</div>	
			
			<div class="clearfix form-actions">
				<div class="col-md-offset-3 col-md-9">
					<button class="btn btn-info" type="submit">
						<i class="ace-icon fa fa-check bigger-110"></i> 提交
					</button>
					&nbsp; &nbsp; &nbsp;
					<button class="btn" type="reset">
						<i class="ace-icon fa fa-undo bigger-110"></i> 重置
					</button>
					&nbsp; &nbsp; &nbsp;
					<a href="${ctxPath}/system/page" class="btn">
						返回
					</a>
				</div>
			</div>											
		</form>
	</div>
</div>	

<%} %>